package com.miao.shop.controller;

import com.miao.common.entity.R;
import com.miao.shop.service.ShopIndexService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author MiaoWenqing
 * @description: 首页控制层
 * @date 2021/2/19 20:59
 */
@RestController
@RequestMapping("common/index")
public class ShopIndexController {

    @Resource
    private ShopIndexService shopIndexService;


    @GetMapping("/category")
    public R getCategory(){

        return R.ok(this.shopIndexService.getCategory());

    }
}
